package com.baiyuan.tms.gateway.core.enums;

import lombok.Getter;

@Getter
public enum KeyEnum {
    publicKeyFilename("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApuzCAC" +
            "+uDtbDW/ecavN2rfd0rhG+rCXisd72mvz3IBKkRFcpVQuyFYo+6Pt4yPT+8ZrfjLb" +
            "IVipa8hRdpK1JGo4sz+kb27tnJFmw8t/Cs71H+Q0kjnf3e+3Vp9Yu5rxmvvHlDJmL" +
            "61wNGGHAFXusueWilF197DlJWbKqTzPp7LRgmatwMvHySuxQKn2Uau7vBtHApMYmM" +
            "slWwfXyyNAyAyVhJWtAQRPz1uIVWQd8ocZCpSK5Dx1Y3ldLsM6kFRtKiaEyF1/Hi2" +
            "3NGn9wrWZKK2G5nt4mjfetDw43RvJmZ9kx7yHRj2kEmfkvVlzyl4G5NHqOPp9xcRu" +
            "vjGHIhji+swIDAQAB","publicKey"),
    privateKeyFilename("MIIEuwIBADANBgkqhkiG9w0BAQEFAASCBKUwggShAgEAAoI" +
            "BAQCm7MIAL64O1sNb95xq83at93SuEb6sJeKx3vaa/PcgEqREVylVC7IVij7o+3j" +
            "I9P7xmt+MtshWKlryFF2krUkajizP6Rvbu2ckWbDy38KzvUf5DSSOd/d77dWn1i7" +
            "mvGa+8eUMmYvrXA0YYcAVe6y55aKUXX3sOUlZsqpPM+nstGCZq3Ay8fJK7FAqfZR" +
            "q7u8G0cCkxiYyyVbB9fLI0DIDJWEla0BBE/PW4hVZB3yhxkKlIrkPHVjeV0uwzqQ" +
            "VG0qJoTIXX8eLbc0af3CtZkorYbme3iaN960PDjdG8mZn2THvIdGPaQSZ+S9WXPK" +
            "Xgbk0eo4+n3FxG6+MYciGOL6zAgMBAAECgf80Kch2RnAeMv7Zvoci5PIxayMLQoBT" +
            "S4OMEiD+Tg7r9udec952tTDxikIejHcyVV1WIw+46WWxh4rkG3kn/P7bTZKzZiVOh" +
            "UG2GlExlLtDb+MN8Q17eAHeuHQL/uKpODbjdLQfO9x9sEZnWCSukfdoIFquAolXSI+" +
            "jeDHAjniLf09Rf9O2yYbkS824XeIpyyZwZbkUT5M+c0KdaRSoKFHOjAik3Q7Z95A3t" +
            "JiFDxLiJTpzV9VTASE8t2PBo5FDP3dYhqumTr62NCvlUo8SQ0kvdQvtKQjrNlJDC1D" +
            "Oi/cc0sZqfiGajG7hghDE7xEN9u+M3FVklX/zcuzlbj2hiYECgYEA+EN8MPvPURRJ" +
            "Cob8wrhkuF+kdD/p0PTuGTNLODBROruA7sl/+J+JUhjpER9MaDtFG4tgOPSq5KuH+/" +
            "9AGhx8PUtICk5gQizUN3y+phzWDZgP+qJxvdEgOua498cGcCmlkFOMsDz0Kdbvz1k/" +
            "R5+ndJXHM8QYwDgCRuic9Svb1gcCgYEArCBlLoheqKQBC/yO4zOSz4I5lHfz1qqTOi" +
            "Ye5y4iPctE9PKl1VfcgSa2aeeix8kAy5fuZF4qmdNNTi5D5xYDHossTZ9327Up9Uws" +
            "IueIsYqKmo72IhWmrXDDZmBcsO7gynEgLdBH78mf8k0eMWfAsvjzuarKPE+pze9t/" +
            "MF5RvUCgYA2F0YMyiB+cuQDJiwWJOTVAwmqxm4kN+lUlkdyQ5y/JjFOVZrLSb86ovD" +
            "M6TvVjexdtv1NC4ncbr8fGZsW1VQAatGUZUU1xdyrBkPnn2rH5XS9z/zmNZVHIBP28" +
            "Gcnsvs+ueVyVKWCJDF1xOUzrsZmcWfIkJYv80QTvQTNqjOoqwKBgBLOFz/WNkFGabb" +
            "diN7Zq5hwKcpGsKUrTZp0v7uSFruZkZcRS3zbdIPHrvYzEF2zYBreJnVgtFbJ9xArj" +
            "c+ZYA3eNqDkYzvltwfNoqTNlumOsUXhiJKAuw0H3NE6heXuszBq25ElyDYyWP8n3by" +
            "YET18ZWRLfHzKV0rgdau/l3hhAoGBAMLDlGuST09o9mJDDhs27jWAs0ePnhocPefea" +
            "uWrudpppK3NBwxtFNDgdSPUMhGNL6rgfrQt952SNNI1nEZfLbUt6pQwJz0VejmLls7" +
            "lQgJLcklH4LmSZkwJlSJ5ZMAHiaX3sttVUXweQ37wvb1sAe6Ui8rI2R1jhHwZsZk0V" +
            "7Rh","privateKey")
    ;
    private String code;
    private String desc;

    KeyEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static String getCode(String desc) {
        for (KeyEnum c : KeyEnum.values()) {
            if (c.desc.equals(desc)) {
                return c.code;
            }
        }

        return null;
    }

    public static String getDesc(String code) {
        for (KeyEnum c : KeyEnum.values()) {
            if (c.code.equals(code)) {
                return c.desc;
            }
        }

        return null;
    }
}
